package org.example.erat.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 课程数据传输对象
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CourseDTO {

    private Long id;

    @NotBlank(message = "课程名称不能为空")
    private String name;

    private String teacher;

    @NotNull(message = "实验数量不能为空")
    @Min(value = 1, message = "实验数量必须大于0")
    private Integer experimentCount;

    private Integer classCount;
}
